// 轮播图数据
layui.use('carousel', function() {
var carousel = layui.carousel
      $.ajax({
        type: 'get',
        url: 'http://localhost:8888/api/swipers',
        success: function (res) {
          if (res.status === 0) {
            let html = template('bo',res)
            $('#kr_carousel ul').html(html)
            // 轮播交互
            carousel.render({
              elem: '#kr_carousel',
              width: 720,
              height: 300,
              interval: 3000
            })
          }
        }
      })
    })

// 合作伙伴
$.ajax({
  type: 'get',
  url: 'http://localhost:8888/api/links',
  success: function (res) {
    if (res.status === 0) {
      let html = template('lj',res)
      $('.kr_collaborator').html(html)
    }
  }
})